<!DOCTYPE HTML>
<html>
<head>
<title>后台管理系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
 <!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet"> 
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!----webfonts--->
<link href='http://fonts.useso.com/css?family=Roboto:400,100,300,500,700,900' rel='stylesheet' type='text/css'>
<!---//webfonts--->  
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
    <style>
        #tab tr td:nth-child(4){
            width: 250px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            display: inline-block;
            margin: 0;
        }
    </style>
</head>
<body>
<div id="wrapper">
     <!-- Navigation -->
        <nav class="top1 navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">Prometheus后台管理系统</a>
            </div>
            <!-- /.navbar-header -->
            <ul class="nav navbar-nav navbar-right">
				<li class="dropdown">
	        		<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-comments-o"></i><span class="badge">4</span></a>
	        		<ul class="dropdown-menu">
						<li class="dropdown-menu-header">
							<strong>Messages</strong>
							<div class="progress thin">
							  <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
							    <span class="sr-only">40% Complete (success)</span>
							  </div>
							</div>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/1.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
								<span class="label label-info">NEW</span>
							</a>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/2.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
								<span class="label label-info">NEW</span>
							</a>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/3.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
							</a>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/4.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
							</a>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/5.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
							</a>
						</li>
						<li class="avatar">
							<a href="#">
								<img src="images/pic1.png" alt=""/>
								<div>New message</div>
								<small>1 minute ago</small>
							</a>
						</li>
						<li class="dropdown-menu-footer text-center">
							<a href="#">View all messages</a>
						</li>
	        		</ul>
	      		</li>
			    <li class="dropdown">
	        		<a href="#" class="dropdown-toggle avatar" data-toggle="dropdown"><img src="images/1.png" alt=""/><span class="badge">9</span></a>
	        		<ul class="dropdown-menu">
						<li class="dropdown-menu-header text-center">
							<strong>Account</strong>
						</li>
						<li class="m_2"><a href="#"><i class="fa fa-bell-o"></i> Updates <span class="label label-info">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-envelope-o"></i> Messages <span class="label label-success">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-tasks"></i> Tasks <span class="label label-danger">42</span></a></li>
						<li><a href="#"><i class="fa fa-comments"></i> Comments <span class="label label-warning">42</span></a></li>
						<li class="dropdown-menu-header text-center">
							<strong>Settings</strong>
						</li>
						<li class="m_2"><a href="#"><i class="fa fa-user"></i> Profile</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-wrench"></i> Settings</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-usd"></i> Payments <span class="label label-default">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-file"></i> Projects <span class="label label-primary">42</span></a></li>
						<li class="divider"></li>
						<li class="m_2"><a href="#"><i class="fa fa-shield"></i> Lock Profile</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-lock"></i> Logout</a></li>	
	        		</ul>
	      		</li>
			</ul>
			<form class="navbar-form navbar-right">
              <input type="text" class="form-control" value="Search..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Search...';}">
            </form>
            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li>
                            <a href="#"><i class="fa fa-laptop nav_icon"></i>基本管理<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="tables.html">数据源管理</a>
                                </li>
                                <li>
                                    <a href="inbox.html">用户管理</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>

                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>
        <div id="page-wrapper">
        <div class="col-md-12 graphs">
	   <div class="xs">
  	 <h3>数据源管理</h3>
    <form action="#" method="GET">
        <div class="input-group">
            <input type="text" name="search" class="form-control1 input-search" placeholder="Search...">
            <span class="input-group-btn">
                <button class="btn btn-success" type="button"><i class="fa fa-search"></i></button>
            </span>
        </div><!-- Input Group -->
    </form>
   <div class="panel-body1">
   <div class="mail-toolbar clearfix">
       <div class="float-left">
            <div class="btn btn_1 btn-default mrg5R">
               <i class="fa fa-refresh"> </i>
            </div>
            <div class="dropdown">
                <a href="#" title="" class="btn btn-default" data-toggle="dropdown" aria-expanded="false">
                    <i class="fa fa-cog icon_8"></i>
                    <i class="fa fa-chevron-down icon_8"></i>
                <div class="ripple-wrapper"></div></a>
                <ul class="dropdown-menu float-right">
                    <li>
                        <a href="#" title="">
                            <i class="fa fa-pencil-square-o icon_9"></i>
                            Edit
                        </a>
                    </li>
                    <li>
                        <a href="#" title="">
                            <i class="fa fa-calendar icon_9"></i>
                            Schedule
                        </a>
                    </li>
                    <li>
                        <a href="#" title="">
                            <i class="fa fa-download icon_9"></i>
                            Download
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#" class="font-red" title="">
                            <i class="fa fa-times" icon_9=""></i>
                            Delete
                        </a>
                    </li>
                </ul>
            </div>
            <div class="clearfix"> </div>
        </div>
       <div class="float-right">
           <span class="text-muted m-r-sm">当前第1页，共175页 </span>
           <div class="btn-group m-r-sm mail-hidden-options" style="display: inline-block;">
                <div class="btn-group">
                    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-folder"></i> <span class="caret"></span></a>
                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        <li><a href="#">Social</a></li>
                        <li><a href="#">Forums</a></li>
                        <li><a href="#">Updates</a></li>
                        <li class="divider"></li>
                        <li><a href="#">Spam</a></li>
                        <li><a href="#">Trash</a></li>
                        <li class="divider"></li>
                        <li><a href="#">New</a></li>
                    </ul>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-tags"></i> <span class="caret"></span></a>
                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        <li><a href="#">Work</a></li>
                        <li><a href="#">Family</a></li>
                        <li><a href="#">Social</a></li>
                        <li class="divider"></li>
                        <li><a href="#">Primary</a></li>
                        <li><a href="#">Promotions</a></li>
                        <li><a href="#">Forums</a></li>
                    </ul>
                </div>
            </div>
           <div class="btn-group">
                <a class="btn btn-default"><i class="fa fa-angle-left"></i></a>
                <a class="btn btn-default"><i class="fa fa-angle-right"></i></a>
            </div>
        </div>
   </div>
   <table class="table" id="tab">
     <thead>
        <tr>
            <th></th>
            <th>ID</th>
            <th>来源</th>
            <th>图标</th>
            <th>描述</th>
            <th>订阅总数</th>
        </tr>
      </thead>
      <tbody>

      </tbody>
    </table>
    </div>
  </div>
  <div class="copy_layout">
    <p>Copyright &copy; 2015.Company name All rights reserved.</p>
  </div>
   </div>
      </div>
      <!-- /#page-wrapper -->
   </div>
    <!-- /#wrapper -->
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<script type="text/javascript">
        function addTr(tab, row, trHtml){
            //获取table最后一行 $("#tab tr:last")
            //获取table第一行 $("#tab tr").eq(0)
            //获取table倒数第二行 $("#tab tr").eq(-2)
            var $tr=$("#"+tab+" tr").eq(row);
            if($tr.size()==0) {
                alert("指定的table id或行数不存在！");
                return;
            }
            $tr.after(trHtml);
        }
        function addTr2(tab, row, item) {
            //alert(item['id']+item['src']+item['logo']+item['des']+item['usersCount'])
            var trHtml = "" ;
            trHtml+="<tr>";
            trHtml+="<td class=\"hidden-xs\"><input type=\"checkbox\" class=\"checkbox\"></td>";
            trHtml+="<td class=\"hidden-xs\">"+item['id']+"</td>";
            trHtml+="<td>"+item['src']+"</td>";
            trHtml+="<td class=\"hidden-xs\">"+item['logo']+"</td>";
            trHtml+="<td>"+item['des']+"</td>";
            trHtml+="<td>"+item['usersCount']+"</td>";
            trHtml+="</tr>";
            addTr(tab, row, trHtml);
        }

		$.ajax({
            type:"GET",
            url:"/category/0",
            dataType:"json",
            success:function(data){
                var html = '';
                var datas = data['data'];
                $.each(datas,function(i, item) {
                    addTr2('tab', -1, item)
                });
            }
         });
	</script>
</body>
</html>
